package com.goodving.guli.bt.model;

import android.os.Parcel;
import android.os.Parcelable;
import android.view.accessibility.AccessibilityNodeInfo;

import com.goodving.guli.bt.profile.scale.HeartRateInfo;

/**
 * Created by john on 2015/11/25.
 */
public final class UserInfo implements Parcelable {
    public static final Creator<UserInfo> CREATOR;
    public static final byte f19666a = (byte) 0;
    public static final byte f19667b = (byte) 1;
    public static final byte f19668c = (byte) 2;
    public static final UserInfo f19669k;
    public final int f19670d;
    public final byte f19671e;
    public final byte f19672f;
    public final byte f19673g;
    public final byte f19674h;
    public final byte[] f19675i;
    public byte f19676j;

    static {
        f19669k = new UserInfo(170420175, f19666a, (byte) 23, (byte) -88, (byte) 50, "anri.okita\u0000".getBytes());
        CREATOR = new C3922t();
    }

    static final class C3922t implements Creator<UserInfo> {
        C3922t() {
        }

        public UserInfo m25472a(Parcel parcel) {
             // return new UserInfo(parcel.readInt(), parcel.readByte(), parcel.readByte(), parcel.readByte(), parcel.readByte(), parcel.readByte(), parcel.readString().getBytes());
             return new UserInfo(parcel.readInt(), parcel.readByte(), parcel.readByte(), parcel.readByte(), parcel.readByte(), parcel.readString().getBytes());

        }

        public UserInfo[] m25473a(int i) {
            return null;
        }

        public /* synthetic */ UserInfo createFromParcel(Parcel parcel) {
            return m25472a(parcel);
        }

        public /* synthetic */ UserInfo[] newArray(int i) {
            return m25473a(i);
        }
    }



    public UserInfo(int i, byte b, byte b2, byte b3, byte b4, byte b5, byte[] bArr) {
        this.f19670d = i;
        this.f19671e = b;
        this.f19672f = b2;
        this.f19673g = b3;
        this.f19674h = b4;
        this.f19675i = bArr;
        this.f19676j = b5;
    }

    public UserInfo(int i, byte b, byte b2, byte b3, byte b4, byte[] bArr) {
        this.f19670d = i;
        this.f19671e = b;
        this.f19672f = b2;
        this.f19673g = b3;
        this.f19674h = b4;
        this.f19675i = bArr;
        this.f19676j = f19666a;
    }

    public int describeContents() {
        return 0;
    }

    public String toString() {
        StringBuilder stringBuilder = new StringBuilder(AccessibilityNodeInfo.ACTION_CLEAR_ACCESSIBILITY_FOCUS);
        stringBuilder.append("[[[ " + getClass().getSimpleName() + " ]]]");
        stringBuilder.append("\n     uid: " + this.f19670d);
        stringBuilder.append("\n  gender: " + (this.f19671e == 0 ? "female" : "male"));
        stringBuilder.append("\n     age: " + this.f19672f + "yrs");
        stringBuilder.append("\n  height: " + (this.f19673g & HeartRateInfo.HR_EMPTY_VALUE) + "cm");
        stringBuilder.append("\n  weight: " + (this.f19674h & HeartRateInfo.HR_EMPTY_VALUE) + "kg");
        stringBuilder.append("\n   alias: " + new String(this.f19675i));
        stringBuilder.append("\n   type: " + this.f19676j);
        return stringBuilder.toString();
    }

    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(this.f19670d);
        parcel.writeByte(this.f19671e);
        parcel.writeByte(this.f19672f);
        parcel.writeByte(this.f19673g);
        parcel.writeByte(this.f19674h);
        parcel.writeString(new String(this.f19675i));
        parcel.writeByte(this.f19676j);
    }
}
